<template>
    <ul>
      <li v-for="(item, index) in list" :key="index">
        {{ item.name }}
        <NestedList v-if="item.children" :list="item.children" />
      </li>
    </ul>
  </template>
  
  <!-- <script>
  export default {
    name: 'NestedList',
    props: {
      list: {
        type: Array,
        required: true
      }
    }
  }
  </script> -->
  <script setup>
  defineProps({
    list: {
      type: Array,
      required: true
    }
  })
  </script>
  